//
//  NSObject+KVO.h
//  ImplementKVO
//
//  Created by Peng Gu on 2/26/15.
//  Copyright (c) 2015 Peng Gu. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^GObservingBlock)(id observedObject, NSString *observedKey, id oldValue, id newValue);

@interface NSObject (KVO)

/**
 KVO
 @param observer observer
 @param key 监听的属性
 @param block 赋值回调  **在子线程中**
 */
- (void)G_addObserver:(NSObject *)observer
                forKey:(NSString *)key
             withBlock:(GObservingBlock)block;

- (void)G_removeObserver:(NSObject *)observer forKey:(NSString *)key;

@end
